package com.misic.wed;

import com.misic.pojo.ListSong;
import com.misic.service.ListSongService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/listSong")
public class ListSongController {
    @Autowired
    private ListSongService listSongService;
    /**
     * 根据歌单id查询歌曲
     */
    @GetMapping(value = "/detail")
    public List<ListSong> detail(@RequestParam("songListId")Integer songListId){
//        String songListId = request.getParameter("songListId");
        return listSongService.listSongOfSongListId(songListId);
    }

}
